<%@ page contentType="text/html; charset=UTF-8" language="java" isErrorPage="false" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>密码更改</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
    <link rel="Shortcut Icon" href="../../images/logo.ico" type="image/x-icon" />
    <link rel="stylesheet" href="/css/bootstrap.css">
</head>
<body>
    <!-- 头部导航栏 -->
    <%@ include file="../header.jsp"%>
    <section class="mt-2">
        <div class="container">
            <div class="row">
                <div class="col-12">
                    <div class="d-flex align-items-center p-3 my-3 text-white-50 rounded border-bottom">
                        <img class="mr-3  rounded-circle shadow" src="${sessionScope.photo}" alt="" width="48" height="48">
                        <div class="lh-100">
                            <h6 class="mb-0 text-muted lh-100">${nickname}</h6>
                            <small class="text-primary">@${username}</small>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <!-- 测边导航栏-->
                <div class="col-lg-2 col-md-12 ml-2">
                    <p class="pl-4 d-none d-lg-block">
                        <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-person-circle mr-1" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
                            <path d="M13.468 12.37C12.758 11.226 11.195 10 8 10s-4.757 1.225-5.468 2.37A6.987 6.987 0 0 0 8 15a6.987 6.987 0 0 0 5.468-2.63z"/>
                            <path fill-rule="evenodd" d="M8 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>
                            <path fill-rule="evenodd" d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zM0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8z"/>
                        </svg>
                        用户中心
                    </p>
                    <ul class="nav nav-pills justify-content-center border">
                        <li class="nav-item pt-2">
                            <a class="nav-link" href="/user/update">个人信息修改</a>
                        </li>
                        <li class="nav-item pt-2">
                            <a class="nav-link" href="/user/updatephoto">头像修改</a>
                        </li>
                        <li class="nav-item pt-2">
                            <a class="nav-link active" href="/user/changepassword">密码修改</a>
                        </li>
                        <li class="nav-item pt-2">
                            <a class="nav-link" href="${type == 1 ?'/cooperation/checkPublish?currentPageIndex=1' : '/activity/selectActivitiesByAid?currentPageIndex=1'}">查看我的发布</a>
                        </li>
                        <li class="nav-item pt-2">
                            <a class="nav-link" href="/user/viewloginlog">查看登陆日志</a>
                        </li>
                    </ul>
                </div>
                <div class="col-lg-9 col-md-12 ml-2">
                    <p class="d-none d-lg-block">密码修改</p>
                    <form class="mt-3" action="/user/changepassword" method="post">
                        <div class="form-group">
                            <label for="inputOldPassword">旧密码：</label>
                            <input type="password" name="oldpassword" class="form-control" id="inputOldPassword">
                        </div>
                        <div class="form-group">
                            <label for="inputPassword1">新密码：</label>
                            <input type="password" name="password1" class="form-control" id="inputPassword1"/>
                        </div>
                        <div class="form-group">
                            <label for="inputPassword2">重复输入:</label>
                            <input type="password" name="password2" class="form-control" id="inputPassword2"/>
                        </div>
                        <button type="submit" class="btn btn-primary">保存</button>${msg}
                    </form>
                </div>
            </div>
        </div>
    </section>


    <!--引入JQuery,再引入popper.js，最后引入bootstrap.js-->
    <script src="/js/jquery.min.js"></script>
    <script src="/js/bootstrap.bundle.js"></script>
    <script src="/js/message.js"></script>

</body>
</html>